/* 历练容器 */
.adventure-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 历练头部 */
.adventure-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px 12px 0 0;
  color: white;
}

.adventure-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
}

.close-button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* 内容区 */
.adventure-content {
  background: #1a1a2e;
  border-radius: 0 0 12px 12px;
  padding: 30px;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* 故事展示区 */
.story-display {
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  border: 2px solid #667eea;
  border-radius: 8px;
  padding: 25px;
  min-height: 200px;
  margin-bottom: 25px;
  position: relative;
  box-shadow: inset 0 0 20px rgba(102, 126, 234, 0.2);
}

.story-text {
  color: #e0e0e0;
  font-size: 18px;
  line-height: 1.8;
  text-align: justify;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.typing-cursor {
  color: #667eea;
  animation: blink 1s infinite;
  font-weight: bold;
  margin-left: 2px;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.skip-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(102, 126, 234, 0.3);
  border: 1px solid #667eea;
  color: white;
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.skip-button:hover {
  background: rgba(102, 126, 234, 0.5);
  transform: scale(1.05);
}

/* 选项容器 */
.choices-container {
  margin: 25px 0;
  min-height: 120px;
}

.choices-container h3 {
  color: #667eea;
  font-size: 18px;
  margin-bottom: 15px;
  text-align: center;
}

.choices-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.choice-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.choice-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.choice-button:active {
  transform: translateY(0);
}

/* 加载指示器 */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.spinner {
  border: 4px solid rgba(102, 126, 234, 0.2);
  border-top: 4px solid #667eea;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-indicator p {
  color: #667eea;
  font-size: 16px;
}

/* 状态栏 */
.adventure-status {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid #667eea;
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
  font-size: 14px;
  color: #b0b0b0;
}

.adventure-status span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .adventure-content {
    max-width: 95%;
    padding: 20px;
  }

  .story-text {
    font-size: 16px;
  }

  .choice-button {
    padding: 12px 15px;
    font-size: 14px;
  }
}

/* 滚动条样式 */
.adventure-content::-webkit-scrollbar {
  width: 8px;
}

.adventure-content::-webkit-scrollbar-track {
  background: #1a1a2e;
}

.adventure-content::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

.adventure-content::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}
